﻿@model Propro.Models.Project

<p>
    @if (User.IsInRole("Project" + Model.ProjectId))
    {
        @Html.ActionLink("Create New", "addUpdate", new { ProjectId = Model.ProjectId })
    }
</p>


@foreach (var item in Model.Updates)
{
   
    <div class="display-field">
        @Html.DisplayFor(modelItem => item.Content)
    </div>
    <br />
    <div class="display-field">
        On: @Html.DisplayFor(modelItem => item.Date)
        By: @Html.DisplayFor(modelItem => item.User.UserName)
    </div>
    <br />
    if (User.IsInRole("Project" + item.Project.ProjectId))
    {
    <span>
        @Html.ActionLink("Edit", "editUpdate", new { id = item.UpdateId }) |
            @Html.ActionLink("Delete", "deleteUpdate", new { id = item.UpdateId })
    </span>
    }
    <hr />
}

